/**
 * Created with  SublimeText
 * @Author:      Lyle
 * @DateTime:    2016-12-12 21:53:03
 * @Description: 
 */

const initialState = {
    username: 'lylerock',
    password: '12345678',
    error: '',
    time: new Date().toString()
}

export default function regStatus(state = initialState, action) {
    switch (action.type) {
        case 'RESET_LOGIN':
            return Object.assign({}, state, action.data)
        case 'RESET_TIME':
            return Object.assign({}, state, {
                time: action.time
            })
        default:
            return state
    }
}
